package kr.ac.sch.cs.Community;

import kr.ac.sch.cs.HelloBaby.TTS.Tts;
import kr.ac.sch.cs.HelloBaby.ThreeD.Renderer;
import android.os.Handler;
import android.os.Message;

public class ComHandler extends Handler {
	
	/**
	 * @uml.property  name="tts"
	 * @uml.associationEnd  
	 */
	private Tts tts;
	/**
	 * @uml.property  name="renderer"
	 * @uml.associationEnd  
	 */
	private Renderer renderer;
	
	public ComHandler(Tts t, Renderer r) {
		this.tts = t;
		this.renderer = r;
	}
	
	public void handleMessage(Message msg) {
		super.handleMessage(msg);

		String talk = msg.peekData().getString("tts");
		if(talk != null) {
			tts.speak(talk);
			int num1 = talk.length() * 13;
			/*
			renderer.playTime = num1;
			renderer.g_Frame = 0;
        	renderer.isAni = true;
			renderer.aniNum = 3;*/
		}
		
	}
}
